home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 1999-08-08 | 1.0 KB | 44 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "Block"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Public x As Long, y As Long, strength As Long, vtype As Long
- Public bBActive As Boolean
-
- Public Sub Create(nx As Long, ny As Long, nstrength As Long, ntype As Long)
- x = nx
- y = ny
- strength = nstrength
- vtype = ntype
-
- bBActive = True
- End Sub
-
- Public Sub Blit(back As IDirectDrawSurface2)
- Dim nsrcx As Long
-
- nsrcx = strength * 15
- If vtype = 2 Then
- Select Case strength
- Case 0:
- nsrcx = 45
- Case 1:
- nsrcx = 60
- Case 2:
- nsrcx = 75
- End Select
- End If
-
- Blocks.SetSrc 0, nsrcx, 30, nsrcx + 15
- Blocks.Blit x, y, back
- End Sub
-